<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>create category</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="icon" href="${una}/img/favicon.png" type="image/x-icon">
    <link rel="shortcut icon" href="${una}/img/favicon.png" type="image/x-icon">
    <link rel="stylesheet" href="${una}/css/bootstrap.css" />
    <link rel="stylesheet" href="${una}/css/font-awesome.css" />
    <link rel="stylesheet" href="${una}/css/ionicons.css" />
    <link rel="stylesheet" href="${una}/js/layer/theme/default/layer.css"/>
    <style>
        table tr td{
            border:none !important;
        }
    </style>
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-12">
            <form class="mt-3" id="category-form">
                <div class="form-group form-inline">
                    <select class="form-control" name="template" id="template" size="15">
                        <#if tpls?? && tpls?size gt 0>
                            <#list tpls as theme>
                                <option value="${theme}">${theme}</option>
                            </#list>
                        </#if>
                    </select>
                </div>
                <div class="form-group text-center">
                    <button type="button" id="save" class="btn btn-primary btn-sm align-center"><i class="fa fa-save"></i> 确认选择</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript" src="${una}/js/jquery.min.js" ></script>
<script type="text/javascript" src="${una}/js/bootstrap.min.js" ></script>
<script type="text/javascript" src="${una}/js/jquery.serializejson.js"></script>
<script type="text/javascript" src="${una}/js/layer/layer.js"></script>
<script type="text/javascript">
    $(function(){
        $("#save").on("click",function(){
            var template = $("select[name=template] option:selected").val();
            var index = parent.layer.getFrameIndex(window.name);
            parent.$("#template").val(template);
            parent.layer.close(index);
        });
    });
</script>
</body>
</html>
